package com.party.mobile.web.dto.crowdfund.output;

import com.party.core.model.crowdfund.ProjectComment;
import org.springframework.beans.BeanUtils;

import java.util.Date;

/**
 * 众筹评论回复输出视图
 * Created by Juliana
 *
 * @date 2017/2/17 0017
 * @time 10:07
 */
public class ProjectCommentOutput {

    //评论id
    private String id;

    //评论内容
    private String comment;

    //评论者图像
    private String commentLogo;

    //评论者名字
    private String commentName;

    //创建时间
    private Date createDate;

    // 评论对象名字
	private String replyName;

	//回复的目标回复记录的id
	private String replyId;

	// 是给谁评论的
	private String targetId;

	// 是否已经回复了本条评论
	private Integer isReply;

	// 是否是众筹发布者(1: 是, 0: 不是)
	private Integer isCrowdfunder;

    public String getId() {
		return id;
	}


	public void setId(String id) {
		this.id = id;
	}


	public String getComment() {
		return comment;
	}


	public void setComment(String comment) {
		this.comment = comment;
	}


	public String getCommentLogo() {
		return commentLogo;
	}


	public void setCommentLogo(String commentLogo) {
		this.commentLogo = commentLogo;
	}


	public String getCommentName() {
		return commentName;
	}


	public void setCommentName(String commentName) {
		this.commentName = commentName;
	}


	public Date getCreateDate() {
		return createDate;
	}


	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public String getReplyName() { return replyName; }

	public void setReplyName(String replyName) { this.replyName = replyName; }

	public String getReplyId() { return replyId; }

	public void setReplyId(String replyId) { this.replyId = replyId; }

	public String getTargetId() { return targetId; }

	public void setTargetId(String targetId) { this.targetId = targetId; }

	public Integer getIsReply() { return isReply; }

	public void setIsReply(Integer isReply) { this.isReply = isReply; }

	public Integer getIsCrowdfunder() { return isCrowdfunder; }

	public void setIsCrowdfunder(Integer isCrowdfunder) { this.isCrowdfunder = isCrowdfunder; }

	/**
     * 众筹回复评论转输出视图
     * @return 支持输出视图
     */
    public static ProjectCommentOutput transform(ProjectComment projectComment){
        ProjectCommentOutput projectCommentOutPut = new ProjectCommentOutput();
        BeanUtils.copyProperties(projectComment, projectCommentOutPut);
        return projectCommentOutPut;
    }
}
